unit IntgrlMainForm;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics,
  Dialogs, StdCtrls, ActnList, Menus, ComCtrls, ExtCtrls, StdActns, SearchEdit;

type

  { TIntegralMainForm }

  TIntegralMainForm = class(TForm)
    acHelpContents: THelpContents;
    acSaveAs: TFileSaveAs;
    acNew: TAction;
    acAbout: TAction;
    MainTimer: TIdleTimer;
    imfImageListMenu: TImageList;
    Memo1: TMemo;
    miHhs: TMenuItem;
    miWsaveas: TMenuItem;
    miWlast: TMenuItem;
    miWnew: TMenuItem;
    miHabout: TMenuItem;
    miHcontnts: TMenuItem;
    miHelp: TMenuItem;
    miSnext: TMenuItem;
    miFhist: TMenuItem;
    imfLeftPanel: TPanel;
    acSearchFind: TSearchFind;
    acSearchNext: TSearchFindNext;
    imfRightPanel: TPanel;
    acShowHist: TAction;
    miFdb: TMenuItem;
    miFgv: TMenuItem;
    miFtask: TMenuItem;
    miFlog: TMenuItem;
    acShowRefDB: TAction;
    acShowLog: TAction;
    acShowScheme: TAction;
    acShowPrjDB: TAction;
    acShowExe: TAction;
    imfActionList: TActionList;
    acParams: TAction;
    acUndo: TEditUndo;
    acExit: TFileExit;
    acOpen: TFileOpen;
    imfImageListTB: TImageList;
    imfMainMenu: TMainMenu;
    miEundo: TMenuItem;
    miWexit: TMenuItem;
    miWrestore: TMenuItem;
    miWhs: TMenuItem;
    miForms: TMenuItem;
    miParams: TMenuItem;
    miEhs: TMenuItem;
    miFref: TMenuItem;
    miSearch: TMenuItem;
    miSsearch: TMenuItem;
    miEdit: TMenuItem;
    miWork: TMenuItem;
    imfToolBar: TToolBar;
    imfStatusBar: TStatusBar;
    imfTreeView: TTreeView;
    imfhSplitter: TSplitter;
    imfTBfile: TToolButton;
    imfTBrefDB: TToolButton;
    imfTBprjDB: TToolButton;
    imfTBexec: TToolButton;
    imfTBschema: TToolButton;
    imfTBver: TToolButton;
    imfTBlog: TToolButton;
    imfSearchEdit: TSearchEdit;
    procedure acAboutExecute(Sender: TObject);
    procedure acShowExeExecute(Sender: TObject);
    procedure acShowHistExecute(Sender: TObject);
    procedure acShowLogExecute(Sender: TObject);
    procedure acShowPrjDBExecute(Sender: TObject);
    procedure acShowRefDBExecute(Sender: TObject);
    procedure acShowSchemeExecute(Sender: TObject);
    procedure acParamsExecute(Sender: TObject);
    procedure acOpenAccept(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
    procedure FormCreate(Sender: TObject);
    procedure MainTimerTimer(Sender: TObject);
    procedure acSearch_Find(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  IntegralMainForm: TIntegralMainForm;

implementation

uses
  LibViewFormUnit, DataViewFormUnit, GVEditorFormUnit, LogViewFormUnit,
  ExctnSystmFormUnit, ParamsFormUnit, HistViewFormUnit, AboutFormUnit,
  IIntgrlBaseDefs, WrkspcCfgrtn;

{ TIntegralMainForm }

procedure TIntegralMainForm.FormCreate(Sender: TObject);
begin
  Caption := prgHeader;
end;

procedure TIntegralMainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
  //
  CanClose := true;
end;

procedure TIntegralMainForm.acShowSchemeExecute(Sender: TObject);
begin
  GVeditForm.Show;
end;

procedure TIntegralMainForm.acShowRefDBExecute(Sender: TObject);
begin
  LibViewForm.Show;
end;

procedure TIntegralMainForm.acShowHistExecute(Sender: TObject);
begin
  HistViewForm.Show;
end;

procedure TIntegralMainForm.acShowExeExecute(Sender: TObject);
begin
  ExctnSystmForm.Show;
end;

procedure TIntegralMainForm.acAboutExecute(Sender: TObject);
begin
  AboutForm.ShowOnTop;
end;

procedure TIntegralMainForm.acShowLogExecute(Sender: TObject);
begin
  LogViewForm.Show;
end;

procedure TIntegralMainForm.acShowPrjDBExecute(Sender: TObject);
begin
  DataViewForm.Show;
end;

procedure TIntegralMainForm.acParamsExecute(Sender: TObject);
begin
  ParamsForm.UpdateParams(IIntegralConfig);
  ParamsForm.ShowOnTop;
end;

procedure TIntegralMainForm.acOpenAccept(Sender: TObject);
begin
  Caption := prgHeader + ' - ' + acOpen.Dialog.FileName;
  IIntegralConfig.iiOpenProject(acOpen.Dialog.FileName);
  GVeditForm.Show;
end;

procedure TIntegralMainForm.MainTimerTimer(Sender: TObject);
begin
  IIntegralConfig.doIdle;
end;

procedure TIntegralMainForm.acSearch_Find(Sender: TObject);
begin

end;

initialization
  {$I intgrlmainform.lrs}

end.

